using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.ServiceModel.Channels;

namespace SlasheneFramework.WCF
{
	public abstract class ProxyChannelListener<TChannel> : IChannelListener<TChannel> where TChannel : class, IChannel
	{
		public ProxyChannelListener(IChannelListener<TChannel> inner)
		{
			_InnerChannelListener = inner;
		}
		private readonly IChannelListener<TChannel> _InnerChannelListener;

		public virtual System.Uri Uri
		{
			get
			{
				return _InnerChannelListener.Uri;
			}
		}
		public virtual System.ServiceModel.CommunicationState State
		{
			get
			{
				return _InnerChannelListener.State;
			}
		}
		public virtual event System.EventHandler Closed
		{

			add
			{
				_InnerChannelListener.Closed += value;
			}

			remove
			{
				_InnerChannelListener.Closed -= value;
			}
		}
		public virtual event System.EventHandler Closing
		{

			add
			{
				_InnerChannelListener.Closing += value;
			}

			remove
			{
				_InnerChannelListener.Closing -= value;
			}
		}
		public virtual event System.EventHandler Faulted
		{

			add
			{
				_InnerChannelListener.Faulted += value;
			}

			remove
			{
				_InnerChannelListener.Faulted -= value;
			}
		}
		public virtual event System.EventHandler Opened
		{

			add
			{
				_InnerChannelListener.Opened += value;
			}

			remove
			{
				_InnerChannelListener.Opened -= value;
			}
		}
		public virtual event System.EventHandler Opening
		{

			add
			{
				_InnerChannelListener.Opening += value;
			}

			remove
			{
				_InnerChannelListener.Opening -= value;
			}
		}

		public virtual TChannel AcceptChannel()
		{
			return _InnerChannelListener.AcceptChannel();
		}
		public virtual TChannel AcceptChannel(System.TimeSpan timeout)
		{
			return _InnerChannelListener.AcceptChannel(timeout);
		}
		public virtual System.IAsyncResult BeginAcceptChannel(System.AsyncCallback callback, System.Object state)
		{
			return _InnerChannelListener.BeginAcceptChannel(callback, state);
		}
		public virtual System.IAsyncResult BeginAcceptChannel(System.TimeSpan timeout, System.AsyncCallback callback, System.Object state)
		{
			return _InnerChannelListener.BeginAcceptChannel(timeout, callback, state);
		}
		public virtual TChannel EndAcceptChannel(System.IAsyncResult result)
		{
			return _InnerChannelListener.EndAcceptChannel(result);
		}
		public virtual T GetProperty<T>() where T : class
		{
			return _InnerChannelListener.GetProperty<T>();
		}
		public virtual System.Boolean WaitForChannel(System.TimeSpan timeout)
		{
			return _InnerChannelListener.WaitForChannel(timeout);
		}
		public virtual System.IAsyncResult BeginWaitForChannel(System.TimeSpan timeout, System.AsyncCallback callback, System.Object state)
		{
			return _InnerChannelListener.BeginWaitForChannel(timeout, callback, state);
		}
		public virtual System.Boolean EndWaitForChannel(System.IAsyncResult result)
		{
			return _InnerChannelListener.EndWaitForChannel(result);
		}
		public virtual void Abort()
		{
			_InnerChannelListener.Abort();
		}
		public virtual void Close()
		{
			_InnerChannelListener.Close();
		}
		public virtual void Close(System.TimeSpan timeout)
		{
			_InnerChannelListener.Close(timeout);
		}
		public virtual System.IAsyncResult BeginClose(System.AsyncCallback callback, System.Object state)
		{
			return _InnerChannelListener.BeginClose(callback, state);
		}
		public virtual System.IAsyncResult BeginClose(System.TimeSpan timeout, System.AsyncCallback callback, System.Object state)
		{
			return _InnerChannelListener.BeginClose(timeout, callback, state);
		}
		public virtual void EndClose(System.IAsyncResult result)
		{
			_InnerChannelListener.EndClose(result);
		}
		public virtual void Open()
		{
			_InnerChannelListener.Open();
		}
		public virtual void Open(System.TimeSpan timeout)
		{
			_InnerChannelListener.Open(timeout);
		}
		public virtual System.IAsyncResult BeginOpen(System.AsyncCallback callback, System.Object state)
		{
			return _InnerChannelListener.BeginOpen(callback, state);
		}
		public virtual System.IAsyncResult BeginOpen(System.TimeSpan timeout, System.AsyncCallback callback, System.Object state)
		{
			return _InnerChannelListener.BeginOpen(timeout, callback, state);
		}
		public virtual void EndOpen(System.IAsyncResult result)
		{
			_InnerChannelListener.EndOpen(result);
		}
	}
}
